<?php

// [ 扩展 ]

namespace app\index\controller;
use think\Controller;
use think\facade\Config;
use think\facade\Session;
use think\Db;
use app\api\lib\Page;

class Exp extends Controller
{
    protected $beforeActionList = [
        'pre' => ['except'=>'miss'],
    ];
    // 前置操作
    protected function pre()
    {
        $member   = Session::get('member');
        if (!$member) die('未授权[用户][1]');
        $defAdmin = Config::get('sg.def_admin');
        if ( !in_array($member['mobile'],$defAdmin) ) $this->redirect('index/exp/miss');
    }

    // 未授权
    // http://sg.io/index/exp/miss
    // http://sg.51hub.cn/index/exp/miss
    public function miss()
    {
        return $this->fetch();
    }

    // -------------------------------------------------------------------------

    // 控制台
    // http://sg.io/exp
    // http://sg.51hub.cn/exp
    public function index()
    {
        return $this->fetch();
    }

    // 充值列表
    // http://sg.io/exp/orders
    // http://sg.51hub.cn/exp/orders
    public function orders()
    {
        return $this->fetch();
    }

    // 定制统计
    // http://sg.io/exp/report
    // http://sg.51hub.cn/exp/report
    public function report()
    {
        return $this->fetch();
    }

    // 循环统计
    // http://sg.io/exp/loop
    // http://sg.51hub.cn/exp/loop
    public function loop()
    {
        return $this->fetch();
    }

    // 私人定制
    // http://sg.io/exp/self
    // http://sg.51hub.cn/exp/self
    public function self()
    {
        return $this->fetch();
    }
}
